.sidebar {
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  bottom: 0;
  width: $sideBarWidth;
  background-color: $menuBackgroundColor;
  transition: width 0.28s;

  +.main {
    height: 100%;
    margin-left: $sideBarWidth;
    transition: margin-left 0.28s;

    .header--fixed {
      left: $sideBarWidth;
    }
  }

  // menu
  .el-menu {
    border: none;

    .el-submenu {
      overflow: hidden;
    }

    .el-menu-item:focus {
      background-color: initial;
    }
  }

  // text
  .el-submenu__title,
  .el-menu-item {
    color: $menuTextColor !important;
  }

  .el-menu-item.is-active {
    color: $menuActiveTextColor !important;
  }

  .is-active>.el-submenu__title {
    color: $subMenuActiveTextColor !important;
  }

  // background-color
  .el-menu,
  .el-scrollbar {
    background-color: $menuBackgroundColor;
  }

  .el-submenu__title,
  .el-menu-item {
    &:hover {
      background-color: $menuHoverBackgroundColor !important;
    }
  }

  .el-menu--inline {
    background-color: $subMenuBackgroundColor !important;

    .el-submenu__title,
    .el-menu-item {
      &:hover {
        background-color: $subMenuHoverBackgroundColor !important;
      }
    }
  }

  // svg
  .svg-icon {
    margin-right: 16px;
  }

  // icon
  .el-menu .submenu-el-icon {
    width: 1em;
    margin-right: 12px;
    margin-left: -2px;
  }

  // scrollbar
  .el-scrollbar {
    height: calc(100% - 50px);
    z-index: 5;

    .el-scrollbar__wrap {
      overflow-x: hidden !important;
    }

    .is-horizontal {
      display: none;
    }

    .is-vertical {
      right: 0;
    }
  }
}

// collapse
.sidebar--collapse {
  width: 54px;

  +.main {
    margin-left: 54px;

    .header--fixed {
      left: 54px;
    }
  }

  .sidebar-logo-icon {
    margin-right: 0;
  }

  .el-menu--collapse {
    width: 100% !important;
  }

  .el-menu--collapse .el-submenu>.el-submenu__title span {
    height: 0;
    width: 0;
    overflow: hidden;
    visibility: hidden;
    display: inline-block;
  }

  .el-submenu>.el-submenu__title .el-icon-arrow-right {
    display: none;
  }
}

// hidden
.sidebar--hidden {
  display: none;

  +.main {
    margin-left: 0;

    .header--fixed {
      left: 0;
    }
  }
}

// hidden logo
.sidebar--hidden-logo {
  .sidebar-logo {
    display: none;
  }

  .el-scrollbar {
    height: 100%;
  }
}

// without animation
.sidebar--without-animation {
  transition: none !important;

  +.main {
    transition: none !important;

    .header--fixed {
      transition: none !important;
    }
  }
}

// mobile
.sidebar-mobile {
  +.main {
    margin-left: 0;

    .header--fixed {
      left: 0;
    }
  }

  &.sidebar--collapse {
    width: 0;
    overflow: hidden;
  }
}

.el-menu--vertical {

  // svg
  .svg-icon {
    margin-right: 16px;
  }

  // icon
  .el-menu-item>.submenu-el-icon {
    margin-right: 12px;
    margin-left: -2px;
  }

  // text
  .el-menu-item.is-active {
    color: $menuActiveTextColor;
  }

  .is-active>.el-submenu__title {
    color: $subMenuActiveTextColor;
  }

  .el-submenu__title,
  .el-menu-item {
    color: $menuTextColor;
  }

  // background-color
  .el-menu {
    background-color: $menuBackgroundColor;
  }

  .el-submenu__title,
  .el-menu-item {
    &:hover {
      background-color: $menuHoverBackgroundColor;
    }
  }

  // popup scroll
  >.el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    @include scrollbar
  }
}